package com.koco.controller;

import com.koco.entity.XxlJobInfo;
import com.koco.utils.XxlJobUtil;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 小哑巴
 * 2023/6/28
 * 19:16
 */
@RestController
@RequestMapping("/SmartDispatch/")
@Validated
public class SmartDispatchController {
    @Resource
    private XxlJobUtil xxlJobUtil;

    @PostMapping("addSmartDispatch")
    @ResponseBody
    public String addSmartDispatch(@RequestBody XxlJobInfo xxlJobInfo){
        return xxlJobUtil.add(xxlJobInfo);
    }

}
